//
//  BK_ExChangeGoods_Header_View.m
//  bestkeep
//
//  Created by TOPTEAM on 2017/3/23.
//  Copyright © 2017年 utouu. All rights reserved.
//

#import "BK_ExChangeGoods_Header_View.h"


@interface BK_ExChangeGoods_Header_View()<SDCycleScrollViewDelegate>
@property(nonatomic,strong)NSMutableArray *imageArray;
@property(nonatomic,strong)NSMutableArray *idArray;
@property(nonatomic,strong)SDCycleScrollView *cycleScrollView;

@end
@implementation BK_ExChangeGoods_Header_View



-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self initialize];
        
    }
    return self;
}
-(void)initialize{
    
    
    self.cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(CGRectGetWidth([UIScreen mainScreen].bounds)/4, 0, CGRectGetWidth([UIScreen mainScreen].bounds)/2, self.frame.size.height) delegate:self placeholderImage:[UIImage imageNamed:@"BKMain_topbanner"]];
    self.cycleScrollView.currentPageDotColor = RGBACOLOR(27, 188, 155, 1);
    self.cycleScrollView.pageDotColor = [UIColor lightGrayColor];
    self.cycleScrollView.imageURLStringsGroup = self.bannerArray;
    self.cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFit;
    [self addSubview:self.cycleScrollView];
    
}
-(void)setImage{
    NSMutableArray *itemArr = [NSMutableArray array];
    for (NSDictionary *dic in self.bannerArray) {
        [itemArr addObject:dic[@"goodsimg"]];
    }
    self.cycleScrollView.imageURLStringsGroup = itemArr;
    self.cycleScrollView.backgroundColor = [UIColor whiteColor];
    self.cycleScrollView.frame = CGRectMake(0, 0, ScreenWidth, self.frame.size.height);
}


@end
